package Zhouliu;

public  class learn {
    public int zy;//原有资源
    public int nzy;//再生资源
    public int people;//可以共多少人生活
    public int people1;//可以生活多少人
    public int year;//可以多少年
    public int year1;//可以生活多少年
    public int age;//总共可以生活多年

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getPeople1() {
        return people1;
    }

    public void setPeople1(int people1) {
        this.people1 = people1;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getYear1() {
        return year1;
    }

    public void setYear1(int year1) {
        this.year1 = year1;
    }

    public int getZy() {
        return zy;
    }

    public void setZy(int zy) {
        this.zy = zy;
    }

    public int getNzy() {
        return nzy;
    }

    public void setNzy(int nzy) {
        this.nzy = nzy;
    }

    public int getPeople() {
        return people;
    }

    public void setPeople(int people) {
        this.people = people;
    }
    public void print(int zy,int nzy,int age){
       int sum=(zy+nzy)/age;
       System.out.println("地球最多能够养活"+(-(sum))+"亿人");
    }
}
